]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
status/remoteAccess: Move to quick settings
authorFlorian Müllner <fmuellner@gnome.org>
Wed, 27 Jul 2022 10:54:24 +0000 (12:54 +0200)
committerMarge Bot <marge-bot@gnome.org>
Tue, 2 Aug 2022 16:05:28 +0000 (16:05 +0000)
And there goes the last icon-only indicator. From now on, some
actual work will be involved 😱️

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2392>

js/ui/panel.js
js/ui/status/remoteAccess.js

index c32393cff9365c966c3452c7a74f1e0971522c32..e487f4518e00cefe06e298068433504a4522e08c 100644 (file)
@@ -383,7 +383,6 @@ class AggregateMenu extends PanelMenu.Button {
         else
             this._bluetooth = null;
 
-        this._remoteAccess = new imports.ui.status.remoteAccess.RemoteAccessApplet();
         this._power = new imports.ui.status.power.Indicator();
         this._powerProfiles = new imports.ui.status.powerProfiles.Indicator();
         this._rfkill = new imports.ui.status.rfkill.Indicator();
@@ -392,7 +391,6 @@ class AggregateMenu extends PanelMenu.Button {
         this._system = new imports.ui.status.system.Indicator();
         this._nightLight = new imports.ui.status.nightLight.Indicator();
 
-        this._indicators.add_child(this._remoteAccess);
         this._indicators.add_child(this._nightLight);
         if (this._network)
             this._indicators.add_child(this._network);
@@ -412,7 +410,6 @@ class AggregateMenu extends PanelMenu.Button {
         if (this._bluetooth)
             this.menu.addMenuItem(this._bluetooth.menu);
 
-        this.menu.addMenuItem(this._remoteAccess.menu);
         this.menu.addMenuItem(this._rfkill.menu);
         this.menu.addMenuItem(this._power.menu);
         this.menu.addMenuItem(this._powerProfiles.menu);
@@ -439,14 +436,17 @@ class QuickSettings extends PanelMenu.Button {
 
         this.setMenu(new QuickSettingsMenu(this, N_QUICK_SETTINGS_COLUMNS));
 
+        this._remoteAccess = new imports.ui.status.remoteAccess.RemoteAccessApplet();
         this._location = new imports.ui.status.location.Indicator();
         this._thunderbolt = new imports.ui.status.thunderbolt.Indicator();
         this._unsafeMode = new UnsafeModeIndicator();
 
+        this._indicators.add_child(this._remoteAccess);
         this._indicators.add_child(this._thunderbolt);
         this._indicators.add_child(this._location);
         this._indicators.add_child(this._unsafeMode);
 
+        this._addItems(this._remoteAccess.quickSettingsItems);
         this._addItems(this._thunderbolt.quickSettingsItems);
         this._addItems(this._location.quickSettingsItems);
         this._addItems(this._unsafeMode.quickSettingsItems);
index 08436d7d11b91027e43569e54683a778895c745d..43435ba4858d4a33d5007b59b61e7641e02347e4 100644 (file)
@@ -5,12 +5,13 @@ const { Atk, Clutter, GLib, GObject, Meta, St } = imports.gi;
 
 const Main = imports.ui.main;
 const PanelMenu = imports.ui.panelMenu;
+const {SystemIndicator} = imports.ui.quickSettings;
 
 // Minimum amount of time the shared indicator is visible (in micro seconds)
 const MIN_SHARED_INDICATOR_VISIBLE_TIME_US = 5 * GLib.TIME_SPAN_SECOND;
 
 var RemoteAccessApplet = GObject.registerClass(
-class RemoteAccessApplet extends PanelMenu.SystemIndicator {
+class RemoteAccessApplet extends SystemIndicator {
     _init() {
         super._init();